package com.hioove.core.web.mvc.model;

import com.hioove.core.model.base.config.MethodSupport;

import java.util.*;

/**
 * 路由信息
 */
public class RouteSupport {

    private Map<String, MethodSupport> route;

    public Map<String, MethodSupport> getRoute() {
        return route;
    }

    public void addRoute(String path, MethodSupport methodSupport) {
        this.route = Optional.ofNullable(this.route).orElseGet(HashMap<String, MethodSupport>::new);
        this.route.put(path, methodSupport);
    }
}
